<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
$this->load->view('logged_in/components/header', array('current_page'=>1));
?>
<!-- Main Wrapper -->

<div id="main-wrapper">
    <div class="container">

        <div class="row">
			<?php $this->load->view('logged_in/blog/left_panel');?>
            <div class="8u skel-cell-important">

                <!-- Content -->
                <div id="content">
	                <?php foreach($articles as $value) {?>
                    <article>
                        <h2><?php echo $value['title']?></h2>
	                    <div class="10u" style="width: 70%; margin: 0 auto;" >
		                    <?php if($value['image'] != '')
		                        echo '<a href="'.base_url().'blog/article/'.$value["id"].'"><img style="width: 100%; border-radius: 5px; display: " src="'. base_url(). 'images/article_image/' . $value['image'] .'"></a>' ;
		                    ?>
                        </div>
	                    <div>
		                <?php echo substr($value['content'], 0, 500).(strlen($value['content']) > 500 ? ' ...' : ''); ?>
	                    </div>
                    </article>
	                <?php } ?>

                </div>
			<div class="8u" style="margin: 0 auto; margin-top: 2em; text-align: center">
				<div class=" btn-group btn-group btn-group-lg">
					<?php echo $pagination ?>
				</div>
			</div>
            </div>
        </div>
    </div>
</div>
<?php
	$this ->load->view('logged_in/components/footer');
?>
